package com.shensi.api.admin.client.label;

import com.shensi.api.admin.client.fallback.label.ButtonSwitchClientFallBack;
import com.shensi.api.admin.domian.label.dto.ButtonSwitchDto;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = ButtonSwitchClientFallBack.class)
@Component
public interface ButtonSwitchClient {

    @GetMapping("/button/switch")
    public AjaxResult getButtonSwitch(@RequestParam("userId") Long userId);

    @PostMapping("/button/update")
    public AjaxResult updateButtonSwitch(@RequestBody ButtonSwitchDto buttonSwitch);

}
